package com.example.controller;

import com.example.entity.Location;
import com.example.repository.LocationRepository;
import io.swagger.v3.oas.annotations.Hidden;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

@Controller
@Hidden
public class HelloHtwoController {

    @Autowired
    private LocationRepository locationRepository;

    @ResponseBody
    @RequestMapping("/hello")
    public List<Location> hello() {
        return locationRepository.findAll();
    }
}